package acwing.lq.递归and递推;

import java.util.Scanner;

/**
 * @description:
 * @author: qian
 * @createDate: 2021/11/18
 */
public class 翻硬币 {
    
    
    static int N = 1010, res = 0;
    static char[] begin = new char[N], end = new char[N];

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);
        begin = s.next().toCharArray();
        end = s.next().toCharArray();

        for (int i = 0; i < end.length; i++) {
            if (begin[i] != end[i]) {
                turn(i);
                turn(i + 1);
                res++;
            }
        }
        System.out.println(res);
    }

    private static void turn(int i) {

        if (begin[i] == 'o') begin[i] = '*';
        else begin[i] = 'o';
    }
}
